﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Aspose.Cells;
using Codemonk.Soya;
namespace Codemonk.Excel.Parser
{
    class Program
    {
        static void Main(string[] args)
        {
            var source_file_path = "../../../Data/双99井钻井取心描述记录.xls";
            IWorkbookParser parser = new WorkbookParser
            {
                ConfigFilePath = string.Concat(System.IO.Path.GetDirectoryName(typeof(Program).Assembly.CodeBase), "./codemonk.soya.xml"),
                Reader = new AsposeWorkbookReader { },
                Converter = new StringConverter { }
            };
            var result = parser.Parse(source_file_path);
            var dr_pg_coring_desc_data = result["dr_pg_coring_desc_data"];
            var dr_pg_coring_description = result["dr_pg_coring_description"];
            IObjectFiller filler = new ObjectFiller();
            var m = filler.Fill<DR_PG_CORING_DESC_DATA>(dr_pg_coring_desc_data);
            Console.WriteLine(m.Count());
            //岩心总数量
            //岩样长度 sample_length
            //距顶位置 sample_top_location
            Console.ReadKey();
        }
    }
}
